Recently, as digital technologies have been developed, data representing a video or audio content is more and more often encoded according to an MPEG or any other standard and stored as an encoded data stream on a storage medium such as an optical disk or a hard disk.
In playing back video and audio from a data stream like this, some players can make a special playback of the video and/or audio by extracting a plurality of portions of the data stream and decoding them consecutively. As used herein, the “special playback” includes a fast forward playback and a rewind playback, and the “fast forward playback” includes an intermittent playback that presents pictures (i.e., frames or fields) intermittently.
Hereinafter, it will be described how a high-speed playback may be carried out by extracting data representing an intra-frame coded picture (which will also be referred to herein as an “intra-frame picture” or simply an “I-picture”) from a data stream in which video was encoded by a bidirectional predictive coding technique (i.e., a video stream). In a program stream to be used according to the DVD Video standard, the data start and end addresses of a reference frame (which is an I-picture) within the stream are described in the navigation information to be transmitted along with its system header. Accordingly, the player can extract only data representing multiple I-pictures to show, combine them together, and then decode them as a single stream. In that case, only the I-picture data is input to the buffer memory of the player for storing the data stream to decode. As a result, the decoding process can be carried out with no errors, and the intended high-speed playback is realized.
Meanwhile, there are some data streams, in which the start and end addresses of I-picture data are not exactly detectable, unlike the program stream. Examples of those streams include a transport stream (which will be abbreviated herein as “TS”). In making a high-speed playback of an I-picture included in a TS, the I-picture is input so as to be sandwiched between unnecessary preceding and succeeding data. Hereinafter, it will be described with reference to FIG. 1 what problems may arise when I-pictures are played back at high speed with two TS combined together. In this high-speed playback, a number of streams are supposed to be defined as a single playback path according to the given play list.
FIG. 1 shows the data structure of an elementary stream C obtained by combining two transport streams A and B, which were written on an optical disk 10. Each of these TS A and B includes a plurality of transport stream packets (TS packets) A1, A2, An, B1, Bm, etc. As in the TS packet A1, each TS packet is made up of a packet header portion 11 and an elementary data portion 12. I-picture data is supposed to be stored in the respective elementary data portions of the TS packets A2 through An.
The player generates the elementary stream C by reading data from the TS packets of the TS A and B and extracting data from the elementary data portions thereof concurrently. The two TS A and B are combined together at a connection point K. Also, while generating the elementary stream C, the player searches the top stream patterns of the I-picture headers, thereby detecting the I-picture header 13 (e.g., “00—00—01—00—20—08”) that has been stored in the elementary data portion V00 of the TS packet A2. Thereafter, the player performs a decoding process to play back the I-picture after having detected the I-picture header 13 and before detecting the header code 14 of the next picture (e.g., a B-picture).
However, since there is the connection point K in the elementary stream C, a pseudo I-picture header pattern is generated at that connection point K to cause a decoding error sometimes.
For example, if the last data of the TS packet An, located just before the connection point K, is “00—00” and the first data of the TS packet B1, located right after the connection point K, is “01—00—20—08”, then a pseudo I-picture header 15, which happens to have the same pattern (“00—00—01—00—20—08”) as the I-picture header 13, is formed. As a result, the player starts to decode the data following the pseudo I-picture header 15 as I-picture data. However, since there is no I-picture data there, a non-decodable data sequence appears in almost all cases. Consequently, a decoding error is produced and the player enters an uncontrollable state due to the abnormal processing.
As a result, another problem arises. Specifically, once a decoding error has happened, initializing processing, including buffer memory clearance, is normally carried out. Accordingly, if the data of the next I-picture has been stored in the buffer memory at that point in time, then that I-picture cannot be presented anymore.
To avoid such an inconvenience, some countermeasure has been taken in the prior art to produce certain effects. In that case, however, it often becomes difficult to decode a plurality of I-pictures continuously, thus possibly further increasing the complexity and load of the processing. For example, in making a special playback of a stream including I-picture data, of which the start and end addresses are not detectable exactly, the conventional player disclosed in Japanese Patent Application Laid-Open Publication No. 2001-36860 continues to input the same data to the decoder while decoding that I-picture data. After having decoded that I-picture data, the player clears the buffer memory and switches the data to input into a data stream including I-picture data to present next.
However, to avoid errors, it is not until this player has decoded a given picture completely that it starts decoding the next picture. Accordingly, it is difficult for the player to decode a plurality of I-pictures continuously. That is to say, it is hard for the player to carry out a decoding process with pictures updated one after another so as not to stop the presentation. In addition, the decoding process needs to be controlled in real time such that the decoding is once stopped before the buffer is cleared and then is resumed after a predetermined amount of data has been accumulated in the buffer memory. Consequently, the complexity and the load of the processing increase inevitably.
An object of the present invention is to decode and play back video and other data quickly and seamlessly from a stream produced by combining a plurality of streams together.